import React from 'react'
import {HashRouter as Router,Route,Switch,Redirect} from 'react-router-dom'
import App from '../app/index.jsx'
import Lazy from './lazy.jsx'
const Welcome = Lazy(()=>import('../pages/Welecome/index'))
const Project = Lazy(()=>import('../pages/Project/index'))
 function BaseRouter() {
    return (
        <Router basename="/">
            <App>
                <Switch>
                    
                    <Route exact path='/' component = {()=>{return <Redirect to="/welcome/shop"></Redirect>}}></Route>
                    <Route path="/welcome" component={Welcome}></Route>
                    <Route path="/project" component={Project}></Route>
                </Switch>
            </App>
        </Router>
    )
}
export default BaseRouter